<?php

namespace app\service;

class SnService
{
    public function get($type)
    {
        $sn = "";
        switch ($type) {
            case 1:
                $sn = "A-";
                break;
            case 2:
                $sn = "B-";
                break;
            case 3:
                $sn = "C-";
                break;
            case 4:
                $sn = "D-";
                break;
            case 5:
                $sn = "E-";
                break;
            case 6:
                $sn = "F-";
                break;
            case 7:
                $sn = "G-";
                break;
            case 8:
                $sn = "H-";
                break;
            case 9:
                $sn = "I-";
                break;
            case 100:
                $sn = "RK-";
                break;
            case 101:
                $sn = "CK-";
                break;
        }
        return $sn . date('Ymd') . str_pad(mt_rand(1, 99999), 5, '0', STR_PAD_LEFT);
    }
}
